package com.wyu.servlet;

import com.wyu.pojo.RE;
import com.wyu.pojo.YG;
import com.wyu.util.DesUtil;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.*;
import java.io.IOException;

@WebServlet("/Logout")
public class Logout extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {


            HttpSession session = request.getSession();

            session.removeAttribute("yg");
            session.setAttribute("message","");
            session.setAttribute("loginMsg","");
            request.getSession().setAttribute("CheckMsg","");
            session.setAttribute("passwordmessage","");
            request.getSession().setAttribute("RegisterMsg","");
            response.sendRedirect("index.jsp");

    }

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }
}
